Repository navigation
FormEncoder 0.11.0: one engine of the app per data folder, an engine log, and a clean stop (engine side only) - #15
Merged
Conversation
…the engine leaves with its app The family's Windows start and stop pattern, engine side, as in FormTools 0.10.0. backend/app/core/startup.py is FormTools's file with the names at its top changed; the shell's process id is read from FORMENCODER_PARENT_PID, which the released shell already sets. backend/app/core/runtime.py holds the log file (logs/formencoder-engine.log), the claim and the release. The entry now makes the data folder and starts the log first, keeps standard error in a file when there was none, opens the app and stops when a frozen engine was started alone, takes engine.lock or refuses with one sentence and exit code 2, and watches its shell. A headless engine takes no lock and is never treated as started alone: it is started on purpose with no app. SIGTERM gives up the lock and withdraws engine.json. Seen on Linux with stand-in shells and a stand-in app; tests/test_startup.py: 15 passed. Nothing ran on Windows or macOS, and no frozen engine was built. backend/HASHOUT_LOG.md has the decisions and what is held.
src-tauri/src/main.rs, the arm that runs when the engine gives no address and key: the sentence is shown first and the loading window is closed only after it returns; it was closed first. The sentence now says that a copy of FormEncoder may already be open, since only one copy can use its data folder, and where the engine's log is. The engine's process id variable is unchanged: the shell already sets FORMENCODER_PARENT_PID, which the engine's lock and watch read. Not compiled: the desktop shell cannot be built here. One string and two statements in another order. Not run on any system. Held: the job object, the failure text with the engine's last lines and exit code, a limit on the wait for the address, and a sentence for a window that fails to build. backend/HASHOUT_LOG.md says what each needs.
…t is already closed backend/app/routers/terminal.py, pump: handing output to the event loop ends the read loop when the loop is closed, and handing over the end notice ignores the same error. The wait for the child stays, so it is still reaped. This was a RuntimeError line in the test job's log, not a failure. Seen: the whole backend suite with this change, 279 passed, no such line in its output.
Sets 0.11.0 at the version sites of the 0.10.0 release (README, backend, frontend package and lock, version.ts, the native and desktop Cargo files and their lock entries, pyproject, tauri.conf.json, the three demo bundles), adds the CHANGELOG entry for the engine side of the Windows start and stop work, the start failure sentence and the terminal reader fix, and lets the function manifest's own generator rewrite form-functions.json. Run on this tree before the commit: the whole backend suite, 279 passed, with stand-in agent programs started 0 times; the function manifest check in step; the text lint with 0 findings. Run on the commits before the bump, in a clone: the shell syntax loop, the setup scripts' Python syntax, compileall and the engine's self-check, agents sync --check in step, the window check (2 passed) and npm audit (0 vulnerabilities). Not run: Windows, macOS, the desktop shell (not compiled here; the native engine was not rebuilt), a packaged engine, any real agent program.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FormEncoder 0.11.0: one engine of the app per data folder, an engine log, and a clean stop (engine side only)
This branch sits on top of
feat/family-update-0.9.0(version 0.10.0, pushed and not yet merged). It adds 4 commits: the engine side of the start and stop pattern that FormTools 0.10.0 has, one small change in the desktop shell, a fix in the terminal's reader, and the release commit. The shell side of the pattern is not in this release; see "Held".What changes for people
FORMENCODER_PARENT_PID, which the released shell already sets, so the shell needed no new variable.logs/formencoder-engine.login the data folder (1 MB, three older files kept). A refused start and an error that stops the engine are written there. An engine with no error stream keeps its errors inlogs/formencoder-engine-errors.log.formencoder-engine --headless, the engine a command line or an agent's bridge starts on purpose with no app, serves as before: it takes no lock and can run beside the app's engine, as it could.How it was checked
Everything below ran on Linux, from source, with stand-ins for the app (
sleep) and for the agent programs.not json at all,[1, 2],{"pid": "x"}and nothing were replaced; a lock naming an unrelated process was replaced and that process kept running; an engine marked as packaged started a stand-in app in each of four install layouts and left with 0, no lock and no address record, and with no app near it left with 4 and the sentence; a headless engine served beside a held lock and left the lock as it was; with its output, its output and error, and all three streams closed the engine answered its health route.backend/tests/test_startup.py, written after that: 15 passed.Checks rehearsed (the jobs of
.github/workflows/ci.yml), in a clone:venv/bin/python -m pytest tests -q -p no:cacheproviderpython3 setup/lint_text.py .,python3 -m py_compile setup/*.pypython -m compileall -q app formencoder_engine.py,python formencoder_engine.py --selfcheck,./formencoder agents sync --check"ok": true, in step. The step that boots an engine and encodes over MCP was not rehearsed.npm ci,npm audit --audit-level=low,npm run buildpython -m pytest frontend/tests/window -q -p no:cacheprovider(Playwright 1.63.0)cargo check --workspace --lockedwith-D warningsinnative, on Ubuntu, macOS and Windowsnativechanged; only its version fields.cargo check --lockedinsrc-tauriOn the release commit itself, in a clone: the version, boot and start test files, 21 passed;
agents sync --checkin step; the window check again, 2 passed;npm audit, 0 vulnerabilities;cargo metadata --locked --offlineinnativeexit 0, so its lock file agrees with the new version. The same command insrc-tauricould not answer without the network, so that lock's one hand-edited version field is checked only by reading it against the 0.10.0 release commit.Not run
src-tauri/src/main.rsin one place (one string, and two statements in another order) and the version fields. The native engine was not rebuilt.cargo checkof the native engine on the three hosts.Held
Merge
Merge with a merge commit. Do not squash and do not rebase-merge.